home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / perl5 / Net / DBus / Binding / Watch.pm < prev   
Encoding:
Perl POD Document  |  2008-02-20  |  1.4 KB  |  74 lines

  1. # -*- perl -*-
  2. #
  3. # Copyright (C) 2004-2006 Daniel P. Berrange
  4. #
  5. # This program is free software; You can redistribute it and/or modify
  6. # it under the same terms as Perl itself. Either:
  7. #
  8. # a) the GNU General Public License as published by the Free
  9. #   Software Foundation; either version 2, or (at your option) any
  10. #   later version,
  11. #
  12. # or
  13. #
  14. # b) the "Artistic License"
  15. #
  16. # The file "COPYING" distributed along with this file provides full
  17. # details of the terms and conditions of the two licenses.
  18.  
  19. =pod
  20.  
  21. =head1 NAME
  22.  
  23. Net::DBus::Binding::Watch - binding to the dbus watch API
  24.  
  25. =cut
  26.  
  27. package Net::DBus::Binding::Watch;
  28.  
  29. use 5.006;
  30. use strict;
  31. use warnings;
  32.  
  33. use Net::DBus;
  34.  
  35. sub AUTOLOAD {
  36.     # This AUTOLOAD is used to 'autoload' constants from the constant()
  37.     # XS function.
  38.  
  39.     my $constname;
  40.     our $AUTOLOAD;
  41.     ($constname = $AUTOLOAD) =~ s/.*:://;
  42.  
  43.     die "&Net::DBus::Binding::Watch::constant not defined" if $constname eq '_constant';
  44.  
  45.     if (!exists $Net::DBus::Binding::Watch::_constants{$constname}) {
  46.         die "no such constant \$Net::DBus::Binding::Watch::$constname";
  47.     }
  48.  
  49.     {
  50.     no strict 'refs';
  51.     *$AUTOLOAD = sub { $Net::DBus::Binding::Watch::_constants{$constname} };
  52.     }
  53.     goto &$AUTOLOAD;
  54. }
  55.  
  56. 1;
  57.  
  58. =pod
  59.  
  60. =head1 AUTHOR
  61.  
  62. Daniel P. Berrange.
  63.  
  64. =head1 COPYRIGHT
  65.  
  66. Copyright (C) 2004-2006 Daniel P. Berrange
  67.  
  68. =head1 SEE ALSO
  69.  
  70. L<Net::DBus::Binding::Connection>
  71.  
  72. =cut
  73.  
  74.